{% extends "base.html"%}
{% block title %}
	个人中心
{% endblock %}
{% block banner %}
	<div id='top-sec-nav' style='border-bottom: 2px solid rgba(0,153,204,0.4);'>
		<div class='banner-nav-left' style='background:rgba(0,153,204,0.4);'>
			<a href='/blog/profile/'>
				<p>个人中心</p>
			</a>	
		</div>
		<div class='banner-nav-lable'><p>你我插肩而过，我们就是只是对方的过客,但请留下你的痕迹,让我知道你至少来过！</p></div>
		<!--  <a href='/blog/profile/'><div class='banner-nav-right' style='background: rgba(0,153,204,0.6);'><p>个人中心</p></div></a> -->
	</div>
{% endblock %}
{% block container %}
	<div class='blog-view'>
		<div class='blog-left'>
			<div id='blog-profile-info'>
				<table id='profilr-table' width='95%' style='color:black;color:#8C8888;font-size:13px;'>
					{% if profile %}
						<tr>
						    <td align=right><strong>名称:</strong></td>
						    {% if profile.name.first_name != ''%}
						    	<td style='padding-left:10px;'>{{ profile.name.first_name}}{{profile.name.last_name}}</td>
						    {% else %}
						    	<td style='padding-left:10px;'>{{ profile.name}}</td>
						    {% endif%}
						    <td align=right ><strong>居住:</strong></td>
						    <td style='padding-left:10px;'>{{ profile.address}}</td>
					  	</tr>
					  	<tr>
						    <td align=right ><strong>工作:</strong></td>
						    <td style='padding-left:10px;'>{{ profile.job}}</td>
						    <td align=right ><strong>爱好:</strong></td>
						    <td style='line-height:25px; padding-left:10px;'>{{ profile.love}}</td>
					  	</tr>
					  	<tr>
						    <td  align=right ><strong>QQ:</strong></td>
						    <td style='padding-left:10px;'>{{ profile.qq}}</td>
						    <td align=right ><strong>Email:</strong></td>
						    <td style='padding-left:10px;'>{{ profile.email}}</td>
					  	</tr>
					  	<tr>
					  		 <td  align=right style="padding-top:5px;vertical-align: top;"><strong>关于我:</strong></td>
						    <td  colspan='3' style='padding-top: 5px;line-height: 25px;padding-left:10px;'><pre>{{ profile.desc}}</pre></td>
					  	</tr>
					{% endif %}
				</table>
			</div>
			<div id='words'>
				
				<div class='word-title'><p>留言板</p></div>
				
			</div>
			<div class='notice'  style='width: 90%; margin: 10px auto;'><p>对网站有任何意见都可以在这里留言给我哟！！！</p></div>
			<div class='profile-content'>
				
				<form method='post' action="/blog/leavemsg/add/">
					<div>
						{{ form.content }}
					</div>
					<button>提交</button>
				</form>
			</div>
			<div id='errmsg'>
				{% if form.errors %}
						<div class='error-msg-add-blog'>
							{{ form.content.errors }}
						</div>
				{% endif %}
			</div>
			{% for content in contents %}
				<div id='comment-display'>
					<div id='comment-info'>
						<p>{{content.timestamp}} </p>
					</div>
					<div id='comment-body-info'><pre>{{content.content}}</pre></div>
				</div>
			{% endfor %}
		</div>
		<div class='blog-right' style='border-left:2px solid rgba(0, 206, 61, 0.5);'>
			<div style='border-bottom: 1px solid rgba(200, 108, 212, 0.5);'><p class='fenlei-p'>图片欣赏</p></div>
			<div id='blog-list-right-midd'>
				<ul class="blog-list-right-banner">   
					{% for pic in pics %}
					<li><a href='/blog/pic/{{pic.id}}' target='view_window'><img alt="{{pic.title}}" src="/media/{{pic.first_pic}}" style='width:100%;height:100%;'></a></li> 
					{% endfor%}
				 </ul> 
			</div>
			<div style='border-bottom: 1px solid rgba(81, 204, 49, 0.5);'><p class='fenlei-p'>旅行日志</p></div>
			<div class='new-blog'>
				{% for new in travels %}
					<a href='/blog/travel/{{ new.id }}/'><div><p>{{ new.title }}</p></div></a>
				{% endfor %}
			</div>
			
			<div style='border-bottom: 1px solid rgba(19, 196, 216, 0.5);'><p class='fenlei-p'>文章推荐</p></div>
			<div class='new-blog'>
				{% for new in newblogs %}
					<a href='/blog/article/{{ new.id }}/'><div><p>{{ new.title }}</p></div></a>
				{% endfor %}
			</div>
		</div>
	</div>
{% endblock %}